from tinyshop_ui.common.button import common_button
from tinyshop_ui.common.img import common_img
from tinyshop_ui.common.input import common_input
from tinyshop_ui.common.login import common_login
from tinyshop_ui.common.iframe import common_iframe
from tinyshop_ui.common.findmodule import common_module
from tinyshop_ui.common.add import common_add
from tinyshop_ui.common.select import common_select
from tinyshop_ui.common.td import common_td
import unittest
class Goods(unittest.TestCase):
    def test_GoodsM(self,param1,parma2,parm,expect):
        webd = common_login().webd
        common_module(webd,param1,parma2)
        common_add(webd)
        common_input(webd).text(webd,parm)
        common_button(webd)
        common_img(webd)
        common_select().many_select(webd)
        common_input(webd).checkbox()
        common_input(webd).submit()
        exp = common_td().res(webd,expect)
        webd.close()
        return exp
    def test_ClassM(self,param1,param2,parm,expect):
        webd = common_login().webd
        common_module(webd,param1,param2)
        common_add(webd)
        common_input(webd).text(webd,parm)
        common_button(webd)
        common_img(webd)
        common_select().many_select(webd)
        common_input(webd).submit()
        exp = common_td().res(webd,expect)
        webd.close()
        return exp
    def test_TypeM(self,param1,parma2,parm,expect):
        webd = common_login().webd
        common_module(webd,param1,parma2)
        common_add(webd)
        common_input(webd).text(webd,parm)
        common_input(webd).submit()
        exp = common_td().res(webd,expect)
        webd.close()
        return exp
    def test_NormsM(self,param1,parma2,parm,expect):
        webd = common_login().webd
        common_module(webd,param1,parma2)
        common_add(webd)
        common_input(webd).text(webd,parm)
        common_input(webd).submit()
        exp = common_td().res(webd,expect)
        webd.close()
        return exp
    def test_BrandM(self,param1,parma2,parm,expect):
        webd = common_login().webd
        common_module(webd,param1,parma2)
        common_add(webd)
        common_input(webd).text(webd,parm)
        common_button(webd)
        common_img(webd)
        common_input(webd).submit()
        exp = common_td().res(webd,expect)
        webd.close()
        return exp